<?php
namespace App\Api\Transformers;


use App\Api\Model\WallpaperModel;
use League\Fractal\TransformerAbstract;

class WallpaperTransformer extends TransformerAbstract
{
    public function transform(WallpaperModel $Model_obj) {
        return [
            'id' => $Model_obj->id,
            'url' => $Model_obj->url,
            'temp' =>$Model_obj->url.'?x-oss-process=image/resize,m_fill,h_200,w_200',
            'width' => $Model_obj->width,
            'height' => $Model_obj->height,
            'like_num' => $Model_obj->like_num,
            'cid' => $Model_obj->cid,
            'author' => $Model_obj->author,
            'md5' => $Model_obj->md5,
            'tags' => $Model_obj->tags,
        ];
    }
}